﻿using MQTTnet.Client;

namespace SmartShopping
{
    public static class MainClass
    {
        public static string ServerIp = "";

        public static int MqttPort = 0;

        public static int ApiPort = 0;

        public static int GatewayId = 0;

        public static double temp = 0.0;

        public static double hum = 0.0;

        /// <summary>
        /// 射灯点名称
        /// </summary>
        public static string LightPortName;

        /// <summary>
        /// 风扇点名称
        /// </summary>
        public static string FanName;


        /// <summary>
        /// 锁点名称
        /// </summary>
        public static string LockName;

        // mqtt服务器对象
        public static IMqttClient MqttClient;



        /// <summary>
        /// 获取连接信息
        /// </summary>
        /// <returns></returns>
        public static string GetApiConnection()
        {
            return $"http://{ServerIp}:{ApiPort}/";
        }


    }
}
